package com.simin.videoplayer;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                VideoDetailInfo videoDetailInfo = new VideoDetailInfo("横屏 哈哈哈哈", "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4");
                Intent intent = new Intent(MainActivity.this, VideoDetailActivity.class);
                intent.putExtra("videobean", videoDetailInfo);
                startActivity(intent);
            }
        });
        findViewById(R.id.button2).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                VideoDetailInfo videoDetailInfo = new VideoDetailInfo("竖屏 哈哈哈哈", "http://1253293872.vod2.myqcloud.com/98a8f24cvodcq1253293872/132dc7bb5285890790218995375/OxztZ5rX9EwA.mp4");
                Intent intent = new Intent(MainActivity.this, VideoDetailActivity.class);
                intent.putExtra("videobean", videoDetailInfo);
                startActivity(intent);
            }
        });
    }
}
